package com.model.util;

import org.hibernate.SessionFactory;
import org.junit.Assert;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.model.action.admin.AdminAction;
import com.model.dao.admin.AdminDao;
import com.model.dao.student.StudentDao;
import com.model.service.admin.AdminService;
import com.model.service.base.BaseService;
import com.model.vo.Admin;
import com.model.vo.Student;


public class SpringConfigTest {  
	private ApplicationContext ctx = new TestApplicationContext().getCtx(); 
 @Test  
  public void testEnity() {  
	 StudentDao action=  ctx.getBean(StudentDao.class);
//	 Student student =  new Student();
//	 student.setId(7);
//	 student.setStuName("fdfdfdfdfdf");
//	 action.update(student);
//	 AdminService adminService =  ctx.getBean(AdminService.class);
//	  System.out.println(adminService.QueryById(1));
//	  Admin admin = new Admin();
//	  admin.setName("admin");
//	  admin.setPassword("123456");
//	  adminService.save(admin);
//      AdminService aMapper =  ctx.getBean(AdminService.class);
//      
//      StudentService sMapper =  ctx.getBean(StudentService.class);
//      
//   StudentAction saMapper =  ctx.getBean(StudentAction.class);
//      
//      Admin admin = new Admin();
//      Student student = new Student();
//      student.setStuName("fd");
//    System.out.println( sMapper.queryListById(1));
////      sMapper.insert(student);
//      Admin admin = new Admin();
//      admin.setName("fdf");
//     aMapper.insertUser(admin);
//  	Assert.assertNotNull(aMapper); 
  }
  
 
   
} 